{% extends "misago/admin/generic/form.html" %}
{% load i18n misago_admin_form %}


{% block title %}
{% if target.pk %}
  {{ target }}
{% else %}
  {% trans "New theme" %}
{% endif %} | {{ active_link.name }} | {{ block.super }}
{% endblock title %}


{% block page-header %}
{{ block.super }}
{% if target.pk %}
  <small>
    {{ target }}
  </small>
{% endif %}
{% endblock page-header %}


{% block page-actions %}
{% if target.pk %}
  <div class="col-auto page-action">
    <a href="{% url 'misago:admin:themes:assets' pk=target.pk %}" class="btn btn-primary btn-sm">
      <span class="far fa-file-alt"></span>
      {% trans "Edit assets" %}
    </a>
  </div>
{% endif %}
{% endblock %}


{% block form-header %}
{% if target.pk %}
  {% trans "Edit theme" %}
{% else %}
  {% trans "New theme" %}
{% endif %}
{% endblock %}


{% block form-body %}
<div class="form-fieldset">
  <fieldset>
    <legend>{% trans "Settings" %}</legend>

    {% form_row form.parent %}
    {% form_row form.name %}

  </fieldset>
</div>
<div class="form-fieldset">
  <fieldset>
    <legend>{% trans "Additional information (optional)" %}</legend>

    {% form_row form.version %}
    {% form_row form.author %}
    {% form_row form.url %}

  </fieldset>
</div>
{% endblock form-body %}
